const express = require("express");
const path = require("path");
let app = express();
app.get("/getdata", (req, res) => {
  console.log("有请求过来了");
  let str = "hello";
  // 接收前端携带过来的函数名称；
  let { cb } = req.query;
  console.log(cb);
  let obj = {
    info: "我是4000端口的数据",
    status: 1
  }
  let data = JSON.stringify(obj)
  res.send(`${cb}('${data}')`)
  //    res.json({
  //     info:"我是4000端口返还的内容",
  //     status:1
  //    })
})
app.listen(4000, function () {
  console.log("4000");
})
